-
-
Notifications
You must be signed in to change notification settings - Fork 799
🐛 Make generics work with SQLModel as base class #1275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
|
Thanks for the contribution! We're currently trying to catch up with the backlog of PRs, and will get back to you once we've had time to review this 🙏 |
YuriiMotov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Not completely understand how it works that __pydantic_** are injected into kwargs, but the fix works!
Code and tests look good!
This comment was marked as resolved.
This comment was marked as resolved.
Refactor type hints to use built-in list instead of List from typing.
Removed the @needs_pydanticv2 decorator from test functions.
Generics, as documented in pydantic's docs do not work.
Repro: Use the example from pydantic's docs. The typevar type does not get validated.
For example:
Response[int](data="not an int")does not raise an error.Furthermore, json schema generation is broken, as described here: #1002
This PR:
Related discussions: